import request from '@/utils/request'
// 查询线索列表
export function cluesList(query) {
  return request({
    url: '/clues/clues/list',
    method: 'get',
    params: query
  })
}
// 查询线索详情
export function cluesDetail(cluesId) {
  return request({
    url: `/clues/clues/${cluesId}`,
    method: 'get'
  })
}

// 线索新增
export function cluesAdd(data) {
  return request({
    url: '/clues/clues',
    method: 'post',
    data: data
  })
}

// 线索编辑
export function cluesUpdate(data) {
  return request({
    url: '/clues/clues',
    method: 'put',
    data: data
  })
}

// 线索删除
export function cluesDelete(cluesIds) {
  return request({
    url: `/clues/clues/${cluesIds}`,
    method: 'delete'
  })
}

// 查询线索跟进记录
export function cluesFollowRecord(cluesId) {
  return request({
    url: `/clues/cluesFollowRecord/${cluesId}`,
    method: 'get'
  })
}

// 线索跟进新增
export function cluesFollowRecordAdd(data) {
  return request({
    url: `/clues/cluesFollowRecord`,
    method: 'post',
    data: data
  })
}

// 查询线索转移记录
export function cluesTransferRecord(cluesId) {
  return request({
    url: `/clues/cluesTransferRecord/${cluesId}`,
    method: 'get'
  })
}

// 线索转移新增
export function cluesTransferRecordAdd(data) {
  return request({
    url: `/clues/cluesTransferRecord`,
    method: 'post',
    data: data
  })
}
